<%-- 
    Document   : list
    Created on : 2014-1-22, 15:32:05
    Author     : chensy
--%>
<%@page contentType="text/html; charset=UTF-8" session="false" %>
<%@include  file="/WEB-INF/jspf/import.jspf"%>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" id="pagerForm" name="searchForm" method="post">
        <div class="searchBar">
            <div class="subBar">
                <c:if test="${!empty dispose.geliUser}">
                    <i>由 <i style="color:blue">${dispose.geliUser.name}</i>于 <fmt:formatDate value="${dispose.updateAt}" type="both"/> 更新</i></c:if>
                <ul>
                    <li id="editBtn"><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="editRemark();">编辑</button></div></div></li>
                    <li style="display: none;" id="saveBtn"><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="saveRemark();">保存</button></div></div></li>
                    <li id="cancelBtn" style="display: none;"><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="cancelEdit();">取消</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <textarea cols="75" rows="13" style="border: 5px;padding:2px; display: none;"  id="text_remark" maxlength="2000">${dispose.remark }</textarea>
    <textarea cols="75" rows="13" style="border: 5px;padding:2px;" disabled id="show_remark" maxlength="2000">${dispose.remark }</textarea>
</div>
<script>
function editRemark(){
    $("#editBtn").hide();
    $("#saveBtn").show();
    $("#cancelBtn").show();
     $("#text_remark").val($("#show_remark").val());
    $("#text_remark").show();
    $("#show_remark").hide();
}
function saveRemark(){
    var val = $("#text_remark").val();
    $.post("${ROOT}/admin/club/updateRemark.do",{clubId:${clubId},remark:val},function(data,resposeText,asg){
        var json = eval("("+asg.responseText+")");
        navTabAjaxDone(json);
        if(json.statusCode==DWZ.statusCode.ok){
           $("#show_remark").val(val);
            cancelEdit();
        }
    });
}
function cancelEdit(){
     $("#editBtn").show();
     $("#saveBtn").hide();
     $("#cancelBtn").hide();
      $("#text_remark").hide();
     $("#show_remark").show();
}
</script>
